package web;

import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by aceyin on 15/6/29.
 * 保存标注了@Protection注解的URL
 */
public class Registry {
    private static final List<String> urls = new ArrayList<>();

    public static void add(String url) {
        if (url == null || StringUtils.isBlank(url)) {
            return;
        }
        urls.add(url);
    }

    public static boolean contains(String url) {
        if (url == null || StringUtils.isBlank(url)) {
            return false;
        }
        return urls.contains(url);
    }
}
